home *** CD-ROM | disk | FTP | other *** search
- Path: news.lava.net!coconut!usenet
- From: Dave Carien <davec@hawaii.edu>
- Newsgroups: comp.lang.c
- Subject: given: char foo[80]; there is no such thing as element foo[80] correct? (i.e. foo[80] = '\0' is beyond the array boundary)
- Date: Thu, 14 Mar 1996 18:53:42 -0800
- Organization: KnightSoft/Voyager
- Message-ID: <3148DBB6.1353@hawaii.edu>
- NNTP-Posting-Host: dialup61.aloha.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (Win16; I)
-
- Yes or no on this, I just recently got confused by two different books. I
- assume that the declaration foo[80] allocates storage for elements 0-79.
- A string could be terminated by doing something like foo[79] = '\0', but
- foo[80] = '\0' would be invalid because such an element does not exist.
- Just looking for confirmation that I'm right here. A simple Y or N will
- do thanks.
- --
- -Recently confused C programmer
-